package com.panda.business.domain;

import com.panda.common.core.domain.entity.SysUser;

import java.io.Serializable;
import java.util.Date;

public class AccountInfo implements Serializable {
	private static final long serialVersionUID = 1L;
	private long id;// AccountId
	private String account;
	private String password;
	private String nickname;
	private String type;// 账号类型（0:管理员，不能登录客户端；1：操作员，可登录客户端，运营后台暂时没有权限）（类型后续可扩展）
	private Integer cid;// SupplierId
	private long did;// 部门id
	private String state;
	private Date create_time;

	/////////////////////////////////
	private String dname;

	public AccountInfo() {
	}
	public AccountInfo(SysUser user) {
		this.id = user.getUserId();
		this.account = user.getUserName();
		this.password = user.getPassword();
		this.nickname = user.getNickName();
		this.type = user.getUserType();
		this.cid = user.getCid();
		this.did = user.getDeptId();
		this.state = user.getStatus();
		this.create_time = user.getCreateTime();
	}

	public AccountInfo(String account, String password, String nickname, String type, Integer cid, String state) {
		this.account = account;
		this.password = password;
		this.nickname = nickname;
		this.type = type;
		this.cid = cid;
		this.state = state;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Integer getCid() {
		return cid;
	}

	public void setCid(Integer cid) {
		this.cid = cid;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public Date getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}

	public long getDid() {
		return did;
	}

	public void setDid(long did) {
		this.did = did;
	}

	public String getDname() {
		return dname;
	}

	public void setDname(String dname) {
		this.dname = dname;
	}

}
